import sqlite3,time,os
write_success=False
while not write_success:
  try:
    conn=sqlite3.connect(r'd:\web\laketune\lkt.db3')
    conn.execute("update rnd set ndip='172.17.124.51' where ndip='172.17.124.51'")
    conn.commit()
    conn.close()
    write_success=True

  except sqlite3.OperationalError,e:
    print e.args[0]
    time.sleep(5)
